<?php
declare (strict_types=1);

namespace app\api\controller\yuql;

use app\logic\yuql\BargainLogic;
use think\Request;

class Bargain
{

    /**
     * yuql
     * 用户砍价控制器
     * @param Request $request
     * @return \think\response\Json
     */
    public function bargain(Request $request)
    {
        try {
            $params = $request->get();
            $result = BargainLogic::userBargain($params);
            return writeJson(1001,$result,'砍价成功');
        } catch (\Exception $e){
            return writeJson(1002, '', $e->getMessage());
        }
    }

}
